import Vue from "vue";
import VueRouter from "vue-router";
// 解决路由重复点击报错问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'default',
        component: () => import('@/views/default'),
        meta:{
            title:'泛亚航运集成电子订舱平台'
        }
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login'),
        meta:{
            title:'系统登录'
        }
    }
]

const router = new VueRouter({
    mode:"history" ,//去掉/#
    routes
})

export default router